# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-readchar
_pkgname=python-readchar
pkgver=2.0.0
_pyver=3.13
pkgrel=13
pkgdesc='Utilities to read single characters and key-strokes.'
arch=('any')
url='https://pypi.org/project/readchar/#files'
license=('MIT')
depends=('python')
makedepends=('python-setuptools' 'python-pip' 'python-wheel')
source=("https://github.com/magmax/python-readchar/archive/$pkgver.tar.gz")
sha512sums=('92331e55080f5ebf55e313bd0e9562d55578df98ee116fa534a2ae47b43cbd9b19cf11263db821490a6b9ae5f62b78d378fd5b4c996d98a88c765af489b4d70f')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  rm -rf "$pkgdir/usr/lib/python$_pyver/site-packages/tests"
}

